package org.zhq.core;

import java.nio.channels.SocketChannel;

/**
 * 可用以进行调度的任务封装
 * 任务执行的回调
 *
 * @author zhengquan
 * @date 2019/3/2
 */
public abstract class IoTask {
    public final SocketChannel channel;
    public final int ops;

    public IoTask(SocketChannel channel, int ops) {
        this.channel = channel;
        this.ops = ops;
    }

    public abstract boolean onProcessTo();

    public abstract void fireThrowable(Throwable e);
}
